package com.day20170508.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/*
 * Created by root on 2017/5/8.
 */
@Controller
@RequestMapping(value = "/LoginServlet")
public class LoginServlet {
    @RequestMapping
    public String fild(){
        return "login";
    }
    @RequestMapping(value = "login.do")
    public String login(String username,String password){
        if(username!=null&&!username.trim().equals("")){
            System.out.println(username);
            return "index";
        }
        return "login";
    }
}
